import config from "@/config"
import http from "@/utils/request"

export default {
	universal:{
		list: {
			name: "通用获取列表API",
			get: async function(params,url = ''){
				return await http.get( `${config.API_URL}`+url, params);
			}
		},
		handle: {
			name: "通用POST操作API",
			post: async function(params,url = ''){
				return await http.post( `${config.API_URL}`+url, params);
			}
		}
	},
	module: {
		list: {
			url: `${config.API_URL}/system/module`,
			name: "模块列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		page: {
			url: `${config.API_URL}/system/pageModule`,
			name: "页面模块列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	mess: {
		list: {
			url: `${config.API_URL}/auth/mess`,
			name: "我的消息",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		sys_notice:{
			url: `${config.API_URL}/system/notifications`,
			name: "系统通知",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	deliver: {
		user: {
			url: `${config.API_URL}/system/deliverUser`,
			name: "配送员",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		pickup:{
			url: `${config.API_URL}/system/pickup`,
			name: "配送员",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	menu: {
		myMenus: {
			url: `${config.API_URL}/system/menu`,
			name: "获取我的菜单",
			get: async function(params){
				return await http.get(this.url,params);
			}
		},
		list: {
			url: `${config.API_URL}/system/menu2`,
			name: "获取菜单",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	dic: {
		tree: {
			url: `${config.API_URL}/system/dic/tree`,
			name: "获取字典树",
			get: async function(){
				return await http.get(this.url);
			}
		},
		list: {
			url: `${config.API_URL}/system/dic/list`,
			name: "字典明细",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		get: {
			url: `${config.API_URL}/system/dic/get`,
			name: "获取字典数据",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	role: {
		list: {
			url: `${config.API_URL}/auth/role`,
			name: "获取角色列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	dept: {
		list: {
			url: `${config.API_URL}/system/dept/list`,
			name: "获取部门列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	user: {
		list: {
			url: `${config.API_URL}/auth/admin`,
			name: "获取管理员列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	balance: {
		list: {
			url: `${config.API_URL}/finance/balance`,
			name: "余额记录",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	mk: {
		turntable:{
			url: `${config.API_URL}/mk/turntable`,
			name: "大转盘",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		coupon: {
			url: `${config.API_URL}/mk/coupon`,
			name: "优惠券",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		jifen:{
			url: `${config.API_URL}/mk/jifen`,
			name: "积分商品",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		jifen_record:{
			url: `${config.API_URL}/mk/jifen_record`,
			name: "兑换记录",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	account: {
		info: {
			url: `${config.API_URL}/auth/info`,
			name: "获取账号信息",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	app: {
		list: {
			url: `${config.API_URL}/system/app/list`,
			name: "应用列表",
			get: async function(){
				return await http.get(this.url);
			}
		}
	},
	log: {
		list: {
			url: `${config.API_URL}/system/logs`,
			name: "日志列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	express: {
		list: {
			url: `${config.API_URL}/order/express`,
			name: "快递公司",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	shop: {
		list: {
			url: `${config.API_URL}/system/store`,
			name: "所有店铺",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	order: {
		list: {
			url: `${config.API_URL}/order/order`,
			name: "订单列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	desk:{
		area: {
			url: `${config.API_URL}/desk/area`,
			name: "区域列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		no:{
			url: `${config.API_URL}/desk/desk`,
			name: "桌号管理",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	goods: {
		list: {
			url: `${config.API_URL}/goods/goods`,
			name: "商品列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		cat: {
			url: `${config.API_URL}/goods/cat`,
			name: "商品分类",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		evaluate: {
			url: `${config.API_URL}/goods/evaluate`,
			name: "商品评价列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}

	},
	recharge:{
		list: {
			url: `${config.API_URL}/finance/recharge`,
			name: "充值记录",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		setting:{
			url: `${config.API_URL}/finance/recharge_set`,
			name: "充值设置",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	withdraw:{
		list: {
			url: `${config.API_URL}/finance/withdraw`,
			name: "提现记录",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	agree:{
		list: {
			url: `${config.API_URL}/system/agreement`,
			name: "协议设置",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	freight_teplate:{
		list: {
			url: `${config.API_URL}/system/freight_teplate`,
			name: "协议设置",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	customer: {
		list: {
			url: `${config.API_URL}/user/user`,
			name: "获取会员列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		level:{
			url: `${config.API_URL}/user/level`,
			name: "会员等级",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		group:{
			url: `${config.API_URL}/user/group`,
			name: "会员分组",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	pay:{
		list: {
			url: `${config.API_URL}/system/pay`,
			name: "获取支付相关",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	table: {
		list: {
			url: `${config.API_URL}/system/table/list`,
			name: "表格列管理列表",
			get: async function(params){
				return await http.get(this.url, params);
			}
		},
		info: {
			url: `${config.API_URL}/system/table/info`,
			name: "表格列管理详情",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	},
	tasks: {
		list: {
			url: `${config.API_URL}/system/tasks/list`,
			name: "系统任务管理",
			get: async function(params){
				return await http.get(this.url, params);
			}
		}
	}
}
